package com.cmrx.model.dao;

import com.cmrx.model.entity.SceneBioEvidence;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by angle on 2019/2/16.
 */
@Mapper
@Repository
public interface SceneBioEvidenceDao {
    /**
     * 根据现勘id查找最大序号
     * @param investigationId
     * @return
     */
    Integer queryMaxNo(String investigationId);

    /**
     * 生物物证统计
     * @param investigationId
     * @return
     */
    Integer queryCount(String investigationId);

    /**
     * 根据现勘id查找生物物证信息
     * @param investigationId
     * @return
     */
    List<SceneBioEvidence> queryByInvestigationId(String investigationId);

    /**
     * 根据id查找生物物证信息
     * @param id
     * @return
     */
    SceneBioEvidence queryById(String id);

    /**
     * 添加生物物证信息
     * @param bioEvidence
     * @return
     */
    int addBioEvidence(SceneBioEvidence bioEvidence);

    /**
     * 根据id修改生物物证信息
     * @param bioEvidence
     * @return
     */
    int updateById(SceneBioEvidence bioEvidence);

    /**
     * 根据id删除生物物证信息
     * @param id
     * @return
     */
    int deleteById(String id);

    /**
     * 根据id修改生物物证提取人和提取人id
     * @param investigationId
     * @param collectedBy
     * @param collectedByName
     * @return
     */
    int updatecCllectedBy(@Param("investigationId")String investigationId,@Param("collectedBy")String collectedBy,@Param("collectedByName")String collectedByName);
}
